package com.ld;

import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * @Author xiao hu die
 * @Date 2021/12/22 20:39
 * @Version 1.0
 */
public class Test3 {
 public static void main(String[] args) {
  List<String> list = new ArrayList<>();
  List<String> list1 =new ArrayList<>();
  list.add("1");
  list.add("2");
  list.add("3");
  list1.add("1");
  list1.add("4");
  list1.add("5");
  list1.add("2");
  list1.add("6");
  Collection<String> union = CollectionUtils.union(list, list1);
  System.out.println(union);
 }
}
